Stabilizing clayey formations

ABSTRACT

A method of stabilizing a clayey geological formation surrounding a hydrocarbon well is described. It comprises the step of treating the formation with a first reactant and a second reactant, characterized in that a reaction of said first and said second reactant is essentially initiated in the presence of clayey material. The reaction can be characterized by substrate intercalation or condensation stabilization with no pH adjustment or stabilization through reaction of glycol with a carbonyl group containing second reactant or a reaction involving an epoxide ring opening under neutral or acidic conditions.

This application is a 371 of PCT/GB98/03700 filed Dec. 10, 1998 whichclaims benefit of application GB 9726331.3 filed Dec. 13, 1997.

This invention relates to compositions and methods for stabilizingsubterranean clayey formations surrounding a borehole. Morespecifically, it pertains to clay stabilizing additives for aqueousfluids used in drilling, completing and maintaining boreholes.

BACKGROUND OF THE INVENTION

When geological formations containing water swelling clays come incontact with water, particularly fresh water, clays in the formationsmay swell and/or disperse with attendant loss of permeability and/ormechanical strength to interfere with recovery of petroleum or otherminerals from the formations. Swelling and dispersion occur when aqueousfluids used in oil recovery come in contact with the clays. Clayeyformations are often impermeable or have low permeability or lose partor all of their permeability on contact of the clays with water or waterbase systems such as injection fluids, drilling muds, stimulation fluidsand gels. Dispersed clays may also invade a permeable producingformation during drilling to create low permeability zone in thevicinity of the borehole.

Given the importance and the ubiquity of clayey or shaley formations, itis not surprising that much effort has been put into developing andimproving additives for clay or shale inhibition. Various methods andadditives can be found for example in the U.S. Pat. Nos. 5,342,530,5,211,250, 5,197,544, 5,152,906, 5,099,923, 5,097,904, 5,089,151,4,842,073, 4,830,765, 4,828,726, 4,563,292, 4,536,303, 4,536,304,4,536,305, 4,505,833, 4,497,596, 4,172,800 and 3,578,781.

These additives usually are salts and/or polymers which effectivelyprevent the water from permeating the clay.

Furthermore, it is known to consolidate sandstone and other highlyporous and weak formations with a fluid containing polymerizablematerials, such as resins or isocyanates in combination with diols.Those methods are described for example in the U.S. Pat. Nos. 5,242,021,5,201,612, 4,965,292, 4,761,099, 4,715,746, 4,703,800, 4,137,971, or3,941,191. It is however important to note that the permeability ofsandstones and similar formations differ from those of shale formationsby several orders of magnitude. The consolidation of highly porous,unstable sandy formations and shale formations with a very low porosityare therefore generally recognized in the art as separate technicalfields.

In technical fields unrelated to the present invention, efforts to formcomposites of clayey materials have been described. The known methods offorming so-called “nanocomposites” include the is addition of a reactive(monomeric or polymeric) species to clays which have been previouslytreated with another compound with which it will react. The ensuingchemical reaction can occur in one of two ways: either the secondadditive is capable of physically cross-linking the polymer, or itpromotes further self-polymerization. Such processes can result innanocomposite silicate-polymers which attain a certain degree ofstiffness, strength and barrier properties with far less ceramic contentthan comparable glass- or mineral-reinforced polymers. As such they arefar lighter in weight than conventionally filled polymers. Examples areprovided by the following references: ‘Polyamide-Organoclay Composites’,S. Fujiwara and T. Sakamota, Japan, Patent 51 109,998, 1976; ‘CompositeMaterial Containing a Layered Silicate’, A. Usaki et al, Toyota, U.S.,U.S. Pat. No. 4,889,885, (1989); M. S. Wang and T. J. Pinnavaia,‘Clay-Polymer Nanocomposites Formed from Acidic Derivatives ofMontmorillonite and an Epoxy Resin’, Chem. Mater., 6, 468, (1994); T. J.Pinnavaia et al, ‘On the Nature of Polyimide-Clay Hybrid Composites’,Chem. Mater., 6, 573, (1994); P. B. Messersmith and E. P. Giannelis,‘Synthesis and Characterization of Layered Silicate-EpoxyNanocomposites,’ Chem. Mater., 6, 1719, (1994); T. Lan and T. J.Pinnavaia, ‘Clay-Reinforced Epoxy Nanocomposites, Chem. Mater., 6, 2216,(1994); E. P. Giannelis, ‘Polymer Layered Silicate Nanocomposites’, Adv.Mater., 8, 29, (1996); T. J. Pinnavaia et al, ‘Epoxy Self-Polymerizationin Smectite Clays’, J. Phys. Chem. Solids, 57, 1005, 1996. In spite ofthe stabilization and strengthening that these additives impart to theresultant nanocomposite materials, there are currently severallimitations to this technology which are important from an oilfieldperspective. One is that the established methodology necessarilyinvolves a high-temperature curing process for the chemical reactions totake place; another is that such an approach inevitably results in theproduction of composites in which the silicate is delaminated andrandomly distributed within the polymer matrix. No technology has beendeveloped which is capable of stabilizing clay silicates under ambient,aqueous conditions.

In view of the above, it is an object of the invention to provide anovel method of stabilizing subterranean clayey formations surrounding aborehole. It is another, more specific object of the invention toprovide clay stabilizing additives for aqueous fluids used in drilling,completing and servicing boreholes under conditions appropriate todrilling oil wells.

SUMMARY OF THE INVENTION

This invention is concerned with the identification of a wide range ofcompounds which are capable of strengthening and stabilizing clay andshale minerals through a process of in-situ polymerization. Thesediverse compounds (or “additives”) include both monomers and polymers,in aqueous solution or suspension. The resulting nanocompositematerials, which have dramatically enhanced mechanical propertiescompared with the original clay and shale samples, have a vast range ofpotential materials-science and materials-technology applications bothwithin and outside the oilfield.

In chemical terms, the invention comprises a wide variety of additiveswhich are capable of stabilizing clay films in aqueous solution. Theadditives that have been tested encompass four broad areas: (1) specieswhich are capable of intercalating clay galleries and affordingstabilization such as diamines, polyethylene glycols (PEGs),polypropylene glycols (PPGs) and polymeric diamines; (2) reagents whichare capable of undergoing condensation reactions and thus polymerizingin-situ such as diamines, aldehydes, ketones, dicarboxylic acids; (3)reagents which are capable of ring opening of epoxides or acrylateseffecting polymerization in-situ such as alcohols, amines; (4) reagentswhich are capable of self-polymerization within clay galleries such asalkenes. All of these techniques provide considerable stabilization overuntreated films.

There are three main applications of the invention. Firstly, it isenvisaged that a drilling mud formulation containing a combination ofthe specified compounds described below may be used as a clay and shaleswelling inhibitor fluid, to maintain the integrity of the wellboreduring conventional drilling operations. Secondly, a completion fluidformulation containing a combination of the same compounds may be usedfor general remedial operations in the wellbore. Finally, the inventionmay be used to achieve the goal of “casingless drilling”, that is toachieve with one and the same drilling and completion fluid theequivalent result of what is today obtained through a combination ofdrilling, casing and cementing operations.

These and other features of the invention, preferred embodiments andvariants thereof, and further advantages of the invention will becomeappreciated and understood by those skilled in the art from the detaileddescription following below.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1. shows the cuttings hardness data for the combinations of DAP,DEC, EDA, BNH2 and Glyoxal, together with the corresponding results foreach of the components on its own in water.

FIG. 2 shows the resulting change in permeability as a reaction inaccordance with an example of the present invention progresses through acore sample.

EXAMPLE(S) FOR CARRYING OUT THE INVENTION

The level of clay stabilization provided by different additives andformulations were assessed by several laboratory techniques.

All combinations of chemical compounds were initially assessed usingthin clay films as the substrate. In this testing procedure a smallpiece of montmorillonite clay film is treated with a combination ofreagents which might be capable of cross-linking or polymerizing insideclay layers and examining the resulting clay for strength and rigidityin a qualitative manner. The treated films were extracted withchloroform and the extract analysed by Mass Spectrometry for directevidence of polymerisation. The most definitive evidence forpolymerisation was obtained by solid state NMR on films produced fromLaponite, a synthetic clay without the paramagnetic impurities presentin the natural montmorillonite clay.

Some of the combinations were then assessed in an outcrop shale, OxfordClay, by measuring the permeability change induced in a shale coreand/or the change in hardness of shale cuttings when exposed to thereactive chemistry.

(1) Clay Film Tests

In this testing procedure a small piece of montmorillonite clay film istreated with a combination of reagents which might be capable ofcross-linking or polymerizing inside clay layers and examining theresulting clay for strength and rigidity in a qualitative manner.

All the film tests described below were performed on the same batch ofmontmorillonite clay films. The films have been stored in a refrigeratorin sealed Petri dishes and checked periodically by infrared spectroscopyto ensure integrity of the samples.

A very wide range of potential stabilizers were examined in terms oftheir chemical reactivity, structure and the conditions under which thetests were performed. All tests have been performed in an identicalmanner by the addition of a piece of montmorillonite film to an aqueoussolution of the intercalator (5 cm³ of a 5% w/w solution), the pH ofwhich had already been adjusted (where necessary, with 10% v/v aqueousHCl solution). The potential cross-linking reagent was then immediatelyadded. The intercalating reagents investigated were BNH₂, B2P, B4P, DAP,DEA, EA, EDA, EG, HQ, P, PA, PC, PEDG, PPD, PPDG and STAPLEX650 and thepotential cross-linkers A, AA, BA, DEC, DEM, DEO, DIT, DMM, EPP, FS, GA,MA, OA, PPDGE, PO and styrene. Cross-linkers were added as either neatreagents (0.5 cm³ A, DEM, DEO, DIT, DMM, EPP, MA, PPDGE, PO, styrene and0.5g BA) or as aqueous solutions (5 cm³ 5% w/w solution AA, DEC, OA; 1cm³ of 50% w/w solution GA and 5 cm³ of a 37% w/v solution FS). Filmswere then allowed to stand in the reaction mixture for 1 day beforewashing with distilled water and were then placed in fresh distilledwater to monitor their long term stability. (The abbreviations used inthis paragraph and the following are listed in Table 0.)

The montmorillonite film tests provided a means of ascertaining thepotential of a number of reagent combinations; the results aresummarized in Table 1 (In Table 1, the term “Stable” applied to describethe film stability means that such films do not dissolve in water, while“Exfoliates” simply means they are visibly fatter after treatment. Thelatter term does not mean the films fall apart; this only happens ifextreme exfoliation occurs and the resulting material does not have amatrix around it which “sets”.) These combinations can be broadlydivided into four categories, i.e., (a) Substrate intercalation; (b)Condensation stabilization with no pH adjustment; (c) Stabilizationthrough epoxide ring opening under neutral or acidic conditions; (d)Substrate in-situ polymerization.

Physical intercalation of the investigated compounds into theinterlamellar layers of the clay, the clay galleries, is a condition forthe subsequent chemical reactions, as mentioned below under (b), (c) and(d), to occur. Intercalation itself without chemical reaction, describedunder (a), is in some cases capable of enhancing the stability of theclay. However, it is the subsequent reaction that gives an increasedclay stability.

(a) Substrate Intercalation

Three films (3, 6 and 24, Table 1) were treated with potentialintercalators without any chemical cross-linking reagent capable offorming covalent bonds. It was found that by mixing PEG and BNH₂solutions in equal quantities a very stable film could be produced. Thisis consistent with the effect of BNH₂ alone, but shows considerableimprovement on PEG stabilization, indicating that amines areconsiderably superior for the stabilization of clays.

(b) Condensation Stabilization

These films are generally the most robust films that have been produced.Particularly impressive properties being associated with films 1, 7, 34,37, 40, 42 and 43 (Table 1). These types of additives are preferred forbore-hole stabilization. In addition to these treatments, a number ofother treatments are available (films 50, 51, 52 and 53 are particularlystable) and that some very interesting effects can occur withinapparently similar reactant sets; e.g. although EA provides a stablefilm with DEC (film 53), the related DEA does not, and the filmdecomposes upon soaking in fresh water (film 54). Attempts to producepolyesters appears to have been less successful (films 55-62). However,it is interesting to note that both film 57 and 61 were both very muchmore robust than any of the other films in this series.

The condensation reactions required to provide stabilization in claygalleries involve equilibria between reactants and condensationproducts. Under aqueous conditions the reactants will clearly befavored, a situation akin to that pertaining in drilling fluids.However, upon intercalation in the interlamellar layer an anhydrousenvironment is created, through the concomitant expulsion of water.These conditions facilitate the condensation process and lead to filmstabilization whilst preventing substrate polymerization in the drillingmud.

(c) Ring Opening Stabilization

The chemical process achieved by the ring opening of epoxides is akin tothe synthesis of a number of polymers, including e.g. PEG, in which achain reaction is started after initial ring opening resulting in an insitu epoxide polymerization. To produce a stable film, acidic solutionsis employed; the acidity of which is dependent upon both theintercalator and the cross-linker. When the diamines (EDA, DAP and BNH₂)are used, only mildly acidic (ca. pH 6) conditions are required withboth PO and EPP to produce very robust films (10, 11, 14, 15 and 25-27,Table 1). With PPDGE, much more acidic conditions (pH 2) produce moreimpressive films (28, 29) than at less acidic pH (films 9, 29). Stablefilms can be produced by adding a small quantity of a diamine solutionto the bulk PEG liquor and treating them with epoxides under mildlyacidic conditions (16B and 17). Films can also be stabilized with PEGand all of the epoxides, although more acid conditions (pH 2) arerequired (30-32); the resultant films are very soft but stable.

(d) Substrate In-situ Polymerization

Of the four methods investigated to produce stable films, this has beenthe least successful. This is perhaps not entirely surprising since thepolymerisation of a substrate necessitates a reaction initiator and itis difficult to control this process. This problem is highlighted byfilm 12 which resulted in the entire test solution polymerising.Generally, this reaction type produces exfoliated films (2, 4, 5, 8 and20), which are often considerably swollen and blistered, indicating thatthe reactions are rapid and too aggressive for the films. Whether thesereactions are of use to stabilise shale is currently an open question.Clearly, a solution which polymerises, as is the case for 12, isundesirable, but the stable film produced with EDA and A (film 33)indicates that there is some potential in this methodology.

Evidence for Absorption into the Interlamellar Layer of Substrates

It is important to establish that the reagents are actually bindingwithin the interlamellar layers of the films rather than merelypolymerizing on the film surface. Evidence for an intercalation effectwas established through the use of X-ray diffraction studies on a numberof stable films; see Table 1. It can be clearly seen that changing theintercalating substrate changes the d-spacings of the montmorillonitefilms. What perhaps provides more conclusive evidence of a genuinepolymerization within the interlamellar layer are the range ofd-spacings that are observed for the intercalating substrate, EDA.Values ranging from 12.72 Å (film 36) to 17.72 Å (film 34) are observed.Both of these films are stable, flexible and hard and show no signs ofexfoliation typical of swelling due to water viz. marked whitening.

Perhaps even more revealing are the different spacings observed for thesame substrates in films 36-38. Although the treated films all haverelatively similar properties (with perhaps most superior behaviorattributable to film 37) the d-spacings are different. The two films (36and 38) which have been adjusted to acidic pH both show similard-spacings of ca. 13 Å whereas film 37 (in which unchanged substrateshave been employed) shows a d-spacing of ca. 15 Å.

Stability of Treated Films

All films that could be, were washed thoroughly with water and thenplaced in distilled water to investigate their long term stability undersaturated aqueous conditions. All of the treated films (1, 7, 10, 14,16B, 17, 25, 27-43, 50, 52, 57, 61, 63-66) show very impressivestability with only films 31, 32 and 61 showing any signs ofdecomposition after up to four months. Films 31 and 32 do show someexfoliation but can still be handled quite readily. Film 61, however, istoo fragile to handle and decomposes. One interesting effect is observedafter prolonged soaking of films treated with EPP. All, with theexception of film 25, become covered with a sticky coating and some (10,14, 17) become transparent. The sticky coating can be accounted for dueto epoxide leaching from the clay and polymerising on its surface. Thesecond effect is more difficult to account for but must relate to achange in the refractive index of the film in some way upon coating withthe polymerising epoxide. This effect also substantiates the absorptionof substrates into the clay films (hence confirming X-ray diffractionresults and extraction studies for 10) as all substrates external to theclay are initially removed on rinsing. It is worth noting that althoughthe physical properties of these films have changed over a period oftime their d-spacings are virtually unchanged. The d-spacings of films1, 7, 10, 14, 16B and 17 after four months soaking in water are 14.0 Å,14.0 Å 15.0 Å, 17.2 Å, 17.2 Å and 17.9 Å respectively. The biggestdifference between previous measurements and the post-soaking resultslie in film 10, which shows a change of nearly 0.6 Å.

Direct Evidence of Polymerization

After extraction of the treated clays (treatments 1, 7, 10, 11, 14, 15,20, 25, 28,36, 40 and 42) with chloroform, fast atom bombardment (FAB)mass spectrometry indicates that polymerization of the additives hasoccurred. However, it is also likely that most of the extracted materialis derived from surface polymerization since the d-spacings between theclay galleries do not alter upon extraction. It is neverthelessindicative that polymerization must be occurring within the claygalleries.

The most definitive evidence for polymerization has been obtained bysolid-state nmr studies using laponite, subjected to treatments 1 and 7(Table 1). Magic-angle ¹³C NMR clearly shows that all formaldehyde hasbeen polymerised in both samples. For the sample from treatment 1 (BNH2and FS), three major signals are found at δ15, 47 and a large broad peakcentred at δ 70 (covering 25 ppm). The highest field signal is due tothe methyl C's, while the remaining signals are due to aminal, methyleneand methine carbons. This convincing evidence for polymerisation withinthe clay was repeated with the sample obtained from treatment 7 (EDA andFS), with peaks at δ34, 45, 54, 67 and 167. The most interesting peak(at 176 ppm) is indicative of either imine or imminium ion formation.The remaining peaks are consistent with EDA methylene C's, aminal C's,poly-acetal C's (from poly-formaldehyde), and mixed hemi-aminal systems.

In the following the results of two further tests are describedexamining quantitatively the effect of the disclosed method on the claymaterial:

Cuttings Hardness Tests

Oxford Clay cuttings of between 2 and 4 mm diameter were soaked in thetest fluids under static, ambient temperature conditions for 48 hrs. Atthe end of this period the cuttings were removed from the solution bysieving and placed in the test device. This consisted of a steel platewith an array of holes drilled in it. The cuttings were forced throughthe holes by a piston attached to a screw thread. Data were recorded astorque on the screw thread against number of turns as the cuttings wereextruded. A higher torque value indicates greater clay inhibition.

FIG. 1. shows the cuttings hardness data for the combinations of DAP,DEC, EDA, BNH2 and Glyoxal, together with the corresponding results foreach of the components on its own in water. With the exception ofEDA+DEC, the performance of the combinations was significantly superiorto that of the individual components.

Permeability of Shale

An Oxford Clay core was used to assess the effect of one of the reactivechemistries on permeability. The cylindrical core approximately 25 mm indiameter and 30 mm long was confined in a Hassler cell at a pressure of8.5 MPa. One end of the core was exposed to fluid at 8.0 MPa and fluidsamples were collected from the other end at atmospheric pressure todetermine flowrate and therefore permeability.

To establish an initial permeability for the untreated core it was firstexposed to a synthetic pore fluid. Once a stable flow rate wasestablished this fluid was switched over to the reactive chemistry, BNH2and Glyoxal, at 5 wt % each in 0.1M CaCl₂ and adjusted to pH 9. FIG. 2shows the resulting change in permeability as the reaction progressesthrough the core.

TABLE 0 List of abbreviations. .A Acrolein AA Adipic acid BA Boric acidBNH₂ CH₃CH(NH₂)CH₂—[OCH(CH₃)CH₂]₁—[OCH₂CH₂]_(m)—[OCH₂CH(CH₃)]_(n)—NH₂B2P 2-^(t)Butylphenol B4P 4-^(t)Butylphenol DAP 1,5-Diaminopentane DEADiethanolamine DEC Diethylcarbonate DEM Dimethylmalonate DEODiethyloxalate DIT Diisopropyl-D-tartrate DMM Dimethylmaleate EAEthanolamine EDA Ethylene-1,2-diamine or 1,2-diaminoethane EG Ethyleneglycol EPP 1,2-Epoxy-3-phenoxypropane FS 37% w/v Formaldehyde solutionGA 50% w/v Glutaric aldehyde solution HQ Hydroquinone MA Methyl acrylateOA Oxalic acid P Phenol PA 2-Acetylpyridine PC 2-PyridinecarboxaldehydePO Propylene oxide PEDG Polyethylenediglucamide

PPD 1,2 Propanediol PPDG Polypropylenediglucamide

PPDGE

PEG

TABLE 1 (Properties of clay nanocomposite materials synthesized) FilmStability Film Condition Film Intercalator Cross-linker pH d-spacing (Å)Exfoliates Stable Brittle Flexible Hard or Soft 1 BNH₂ FS na 14.0 YesYes Hard 2 BNH₂ MA/H₂O₂ na — Yes Yes Hard 3 BNH₂/PEG — na — Yes Yes Hard4 PEG MA na — Yes Soft 5 PEG MA/H₂O₂ na — Yes Soft 6 PEG BA na — Yes 7EDA FS na 14.4 Yes Very Hard 8 FS Catalytic H₂O₂ na — Yes Yes Yes Hard 9EDA PPDGE 6 — Yes Yes Some 10 EDA EPP 6 15.6 Yes Yes Hard 11 EDA PO 6 —Yes Yes 12* EDA A na — 13 BNH₂ PPDGE 6 — Yes Yes Yes Hard 14 BNH₂ EPP6.4 — Yes Yes Hard 15 BNH₂ PO 6.6 — Yes Yes Some Hard 16B 4PEG:1BNH₂ EPP4 17.3 Yes Yes Hard 17 4PEG:1EDA EPP 5 17.7 Yes Slightly Yes Hard 18 PEGEPP na — Yes Soft 19 PEG PO na — Yes Soft 20 — Styrene/H₂O₂ na — YesSoft 21 PEG EPP/H₂O₂ na — Yes Soft 22 PEG PO/H₂O₂ na — Soft 23 DAP FS na— Yes Yes Hard 24 DAP — na — Yes Yes Hard 25 DAP EPP 6.5 18.6 YesSlightly Hard 26 DAP PO 6.5 — Yes Yes 27 DAP PO/EPP na 17.2 Yes Yes Hard28 EDA PPDGE 2 14.1 Yes Yes Hard 29 BNH₂ PPDGE 2 16.9 Yes Yes Hard 30PEG PPDGE 2 17.5 Yes Yes Soft 31 PEG PO 2 16.5 Yes Yes Soft 32 PEG EPP 216.8 Yes Yes Soft 33 EDA A na 15.1 Yes Yes Hard 34 EDA PC na 17.7 YesYes Hard 35 EDA PA na 15.1 Yes Hard 36* EDA AA 6 12.7 Yes Yes Hard 37EDA AA na 15.0 Yes Very Hard 38* EDA AA 2 13.0 Yes Yes Hard 39* EDA OA 615.5 Yes Yes Slightly Hard 40 EDA OA na 15.1 Yes Very Hard 41* EDA OA 215.6 Yes Yes Hard 42 EDA GA na 15.5 Yes Yes Hard 43 BNH₂ GA na —∞ YesYes Yes 44 PEDG PO 6 — Yes 45 PEDG EPP 6 — Yes 46 PEDG PDGB 6 — Yes 47PPDG PO 6 — Yes 48 PPDG EPP 6 — Yes 49 PPDG PDGE 6 — Yes 50 EDA DEC na —Yes Very Hard 51 BNH₂ DEC na — Yes Yes Hard 52 DAP DEC na — Yes VeryHard 53 EA DEC na — Yes Yes Hard 54 DEA DEC na — ⊥ Soft 55 EG DEM na —Yes ⊥ Soft 56 EG DMM na — Yes ⊥ Soft 57 EG DIT na — Yes Yes Yes 58 EGDEO na — Yes Yes⊥ Yes 59 PPD DEM na — Yes Soft 60 PPD DMM na — Yes ⊥Soft 61 PPD DIT na — Yes Yes 62 PPD DEO na — Yes ⊥ Soft 63 HQ FS na —Yes Yes Hard 64 P FS na — Some Yes Yes Hard 65 B4P FS na — Yes Yes Hard66 B2P FS na — Yes Yes Slightly Yes Hard +film 12 test resulted inpolymerisation of the intercalator solution on addition of the acrolein*considerable precipitation of intercalator/cross-linker complex∞although film 43 is stable no d-spacing was measured due to thenon-homogeneous nature of the treated film ⊥All these films decomposeupon overnight soaking in fresh water

What is claimed is:
 1. A method of stabilizing a clayey geologicalformation surrounding a hydrocarbon oil well comprising the steps of:injecting from a surface reservoir an aqueous fluid comprising a firstand a second reactant, wherein the first reactant is a glycol and thesecond reactant comprises at least one carbonyl group; letting saidfluid contact said clayey formation; allowing intercalation of saidfirst and second reactant into clay galleries of said clayey geologicalformation; and stabilizing said formation by using a reaction betweensaid first and said second reactant, wherein said reaction comprises anin situ polymerization taking place in the presence of clay, within saidclay galleries, to maintain the integrity of said hydrocarbon oil well.2. The method of claim 1, wherein the reaction comprises a condensationstabilization with or without pH adjustment.
 3. A method of drilling awellbore into a potentially hydrocarbon bearing formation comprising thesteps of drilling part of said wellbore through a clayey formation andusing a method in accordance with claim 1 to stabilize said formation.4. The method of claim 1, wherein the reaction comprises a stabilizationthrough epoxide ring opening under neutral or acidic conditions.
 5. Themethod of claim 1, wherein a reaction product of said reaction isintercalated in the clay galleries.
 6. A method of stabilizing a clayeygeological formation surrounding a hydrocarbon oil well comprising thesteps of: injecting from a surface reservoir an aqueous fluid comprisinga first and a second reactant, wherein the first reactant is a diamineor a polyhydric alcohol, wherein the reaction comprises a stabilizationthrough epoxide ring opening under neutral or acidic conditions; lettingsaid fluid contact said clayey formation; allowing intercalation of saidfirst and second reactant into clay galleries of said clayey geologicalformation; and stabilizing said formation by using a reaction betweensaid first and said second reactant, wherein said reaction comprises anin situ polymerization taking place in the presence of clay, within saidclay galleries, to maintain the integrity of said hydrocarbon oil well.